package cn.huifu.management.controller;

import cn.huifu.management.mapper.BannerMapper;
import cn.huifu.management.pojo.vo.IndexBannerVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/banner")
public class BannerController {
    @Autowired(required = false)
    BannerMapper mapper;
//    因为首页有多个轮播图    因此在添加并修改文件名时务必根据index从上到下的顺序
//    依次插入one/two。。。。用来在查询语句中区别添加在哪个轮播图中
    @RequestMapping("/selectIndexOne")
    public List<IndexBannerVO> selectIndexOne(){
        return mapper.selectIndexOne();
    }
    @RequestMapping("/selectIndexTwo")
    public List<IndexBannerVO> selectIndexTwo(){
        return mapper.selectIndexTwo();
    }
}
